1. Field of the Invention
The present invention relates to an image processing apparatus for reducing distortion in vectorization of an object in a document that has been input by a scanner or the like, method, a recording medium storing the program thereof.
2. Description of the Related Art
With regard to the vectorization of images, a vectorization technique directed toward the fonts (typefaces) used in word processors and the like is well known in the art. A vectorization technique for fonts deals with input solely of characters designed beforehand to have an attractive appearance. When vectorization is carried out, a single character created in an analog fashion is digitized as a binary image having a comparatively large size of 512×512 pixels or 1024×1024 pixels, and the contour of the character is vectorized.
Since vectorized data basically makes it possible to express a smooth contour even when the character is enlarged to various desired sizes, the quality of character shapes represented by this data generally is considered good. Furthermore, since characters of various sizes can be generated based upon a single item of data, additional advantages are simplicity and the ability to reduce the amount of data. Accordingly, the specification of Japanese Patent No. 3049672 proposes a technique for implementing vectorization processing for the purpose of obtaining effects that exploit these features not only with regard to fonts but also with regard to binary images in general. Further, since vectorized data fundamentally is numerical data based upon coordinate values, editing processing by computer is easy to perform. Accordingly, the specification of Japanese Patent No. 2845107 discloses a proposal relating to vectorization of a read image that includes full-color portions.
The specification of Japanese Patent No. 3026592 discloses a proposal relating to vectorization of a binary image that is the premise of Japanese Patent No. 3049672. Japanese Patent No. 3026592 discloses an arrangement for retaining a pixel of interest from image data and the states of neighboring pixels, extracting the pixel of interest in the order of raster scanning and detecting vectors between pixels in the horizontal and vertical directions based upon the pixel of interest and states of the neighboring pixels. Also proposed is a method of discriminating the state of connection of the vectors between pixels and extracting the contour of image data based upon the discriminated connection state of the vectors between pixels. According to this method, all contour lines in an image can be extracted by just a single raster scan sequence and an image memory for storing all image data is not required. This makes it possible to reduce memory capacity. Further, by extracting contours in units of pixel edges and not based upon the center positions of pixels in an input image, a contour line having a useful width can be extracted even with regard to a fine line having a width of one pixel.
Further, when a vectorization technique is applied to a character, there are many cases where the approximation accuracy of vectorization is poor, the contours do not coincide between a character to be vectorized and a character that has been vectorized and, as a result, typical distortion occurs in vectorization. In order to deal with this problem, the specification of Japanese Patent Laid-Open No. 05-35871 discloses a method of finding a distance function between a given contour point and a contour vector while the positions of a prescribed number of end points of contour vectors are adjusted at one time, and obtaining a contour vector for which the norm is smallest. However, there is no particular description regarding a reduction in processing time and therefore this method is difficult to apply to the packaging of a product.